<!DOCTYPE html>
<html>
<head>
<title></title> <@h.head />
<script type="text/javascript" src="${path}/static/plugins/lhgdialog/lhgdialog.min.js"></script>
	
<style type="text/css">
body {
	padding-bottom: 40px;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
</head>
<body>
    
	<div class="span11 m20 doc-content">
	   <form class="form-horizontal well" action="${path}/sysuser/reset/pwd" id="fm" method="post">
	      <div class="row">
	        <div class="control-group span6">
	          <label class="control-label">原密码：</label>
	          <div class="controls">
	            <input type="password" class="control-text" name="oldpwd">
	          </div>
	        </div>
	      </div>
	      <div class="row">
	        <div class="control-group span6">
	          <label class="control-label">新密码：</label>
	          <div class="controls">
	            <input type="password" class="control-text" name="password">
	          </div>
	        </div>
	      </div>
	      <div class="row">
	        <div class="control-group span6">
	          <label class="control-label">确认密码：</label>
	          <div class="controls">
	            <input type="password" class="control-text" name="confirm">
	          </div>
	        </div>
	      </div>
	      <div class="row">
	        <div class="control-group span3" style="margin-left: 150px;">
	          <div class="alert alert-error hide" ><span></span></div>
	        </div>
	      </div>
	      
	      <div class="row">
	        <div class="form-actions offset1">
	          <button type="submit" class="button button-primary">保存</button>
	          <button type="reset" class="button">重置</button>
	        </div>
	      </div>
	    </form>
	</div>
    
	<@h.foot />
	
</body>
</html>

<script type="text/javascript">
	var callback = function(data) {
		if (data.status == "200") {
			 $.dialog({
				title: '提示',
				icon: 'success.gif',
			    content: '密码修改成功',
			    width: 200,
			    lock: true,
			    cancel: false,
			    ok: function(){
			    	window.location.reload();
			    }
			});
		} else {
			$('.alert-error').find("span").html(data.data);
			$('.alert-error').show();
		}
	}
	$("#fm").validFrom(callback);
</script>